package com.tsmti.lab.controller.system;

import com.tsmti.core.common.annotation.RequiresMethodPermissions;
import com.tsmti.core.common.controller.BaseCrudController;
import com.tsmti.shiro.annotation.RequiresPathPermission;
import com.tsmti.system.entity.Organization;
import com.tsmti.util.OrganizationUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Package：com.tsmti.lab.controller.system
 * @Class：OrganizationController
 * @Description： TODO
 * @Author：zcw
 * @Date：Created in 2018/3/14 17:16
 * @Company:
 * @Version：
 * @Modified By:
 */
@Controller
@RequestMapping("/system/organization")
@RequiresPathPermission("sys:organization")
public class OrganizationController extends BaseCrudController<Organization,Long> {
    @RequiresMethodPermissions("list")
    @RequestMapping(method = RequestMethod.GET)
    @Override
    public String list(Model model, HttpServletRequest request, HttpServletResponse response) {
       String name =  OrganizationUtils.getNameByCode("61");
       return display("list");
    }
}
